package com.ruoyi.qsng.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.qsng.domain.TStudentCertificate;
import com.ruoyi.qsng.mapper.TStudentCertificateMapper;
import com.ruoyi.qsng.service.ITStudentCertificateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * 学生获奖Service业务层处理
 * 
 * @author gk
 * @date 2023-08-15
 */
@Service
public class TStudentCertificateServiceImpl implements ITStudentCertificateService
{
    @Autowired
    private TStudentCertificateMapper tStudentCertificateMapper;

    /**
     * 查询学生获奖
     * 
     * @param id 学生获奖主键
     * @return 学生获奖
     */
    @Override
    public TStudentCertificate selectTStudentCertificateById(Long id)
    {
        return tStudentCertificateMapper.selectTStudentCertificateById(id);
    }

    /**
     * 查询学生获奖列表
     * 
     * @param tStudentCertificate 学生获奖
     * @return 学生获奖
     */
    @Override
    public List<TStudentCertificate> selectTStudentCertificateList(TStudentCertificate tStudentCertificate)
    {
        return tStudentCertificateMapper.selectTStudentCertificateList(tStudentCertificate);
    }

    /**
     * 新增学生获奖
     * 
     * @param tStudentCertificate 学生获奖
     * @return 结果
     */
    @Override
    public int insertTStudentCertificate(TStudentCertificate tStudentCertificate)
    {
        tStudentCertificate.setCreateTime(DateUtils.getNowDate());
        return tStudentCertificateMapper.insertTStudentCertificate(tStudentCertificate);
    }

    /**
     * 修改学生获奖
     * 
     * @param tStudentCertificate 学生获奖
     * @return 结果
     */
    @Override
    public int updateTStudentCertificate(TStudentCertificate tStudentCertificate)
    {
        tStudentCertificate.setUpdateTime(DateUtils.getNowDate());
        return tStudentCertificateMapper.updateTStudentCertificate(tStudentCertificate);
    }

    /**
     * 批量删除学生获奖
     * 
     * @param ids 需要删除的学生获奖主键
     * @return 结果
     */
    @Override
    public int deleteTStudentCertificateByIds(Long[] ids)
    {
        return tStudentCertificateMapper.deleteTStudentCertificateByIds(ids);
    }

    /**
     * 删除学生获奖信息
     * 
     * @param id 学生获奖主键
     * @return 结果
     */
    @Override
    public int deleteTStudentCertificateById(Long id)
    {
        return tStudentCertificateMapper.deleteTStudentCertificateById(id);
    }
}
